{% extends 'django_ledger/layouts/content_layout_1.html' %}
{% load i18n %}
{% load static %}
{% load django_ledger %}

{% block view_content %}
    <div class="columns is-centered is-multiline">
        <div class="column is-12">
            {% include 'django_ledger/journal_entry/includes/card_journal_entry.html' with journal_entry=journal_entry %}
        </div>
        <div class="column is-12">
            <div class="card">
                <div class="card-header">
                    <div class="card-header-title">{% trans 'Journal Entry Transactions' %}</div>
                </div>
                <div class="card-content">
                    {% transactions_table journal_entry %}
                    <a class="button is-primary is-outlined"
                       href="{% url 'django_ledger:je-detail-txs' entity_slug=view.kwargs.entity_slug ledger_pk=view.kwargs.ledger_pk je_pk=journal_entry.uuid %}">
                        {% trans 'Edit TXS' %}
                    </a>
                    <a class="button is-dark"
                       href="{% url 'django_ledger:je-list' entity_slug=view.kwargs.entity_slug ledger_pk=view.kwargs.ledger_pk %}">
                        {% trans 'Ledger Detail' %}
                    </a>
                    {% if journal_entry.can_unlock %}
                        <a class="button is-warning"
                           href="{% url 'django_ledger:je-mark-as-unlocked' entity_slug=view.kwargs.entity_slug ledger_pk=view.kwargs.ledger_pk je_pk=journal_entry.uuid %}">
                            {% trans 'Unlock' %}
                        </a>
                    {% endif %}
                    <a class="button is-info"
                       href="{% url 'django_ledger:je-update' entity_slug=view.kwargs.entity_slug ledger_pk=view.kwargs.ledger_pk je_pk=journal_entry.uuid %}">
                        {% trans 'Update' %}
                    </a>
                </div>
            </div>
        </div>
    </div>
{% endblock %}